<?php

class AdministrationController extends AuthController {
	private $DB;
	public function __Init(){
		$this->DB = new AdministrationModel;
	}
	
	// 修改管理员密码异步实现
	public function rePass(){
		if(ISPOST){
			// 修改成功返回两个参数，state状态message提示信息
			if($this->DB->RePass()){
				$re = array('state'=>1,'message'=>'修改成功');
				echo json_encode($re);
			}else{//修改失败返回两个参数，state状态message提示信息
				$re = array('state'=>0,'message'=>$this->DB->error);
				echo json_encode($re);
			}
		}else{
			$this->display('rePass.html');
		}
		
	}

	public function setSystem(){
		$this->display('web_set.html');
	}
}


?>